package com.neusoft.bizcore.web.exception;

/**
 * 由于建立池对象、发送指令超时等错误，可能在重试后，能成功的错误
 * 
 * @author sunchf
 */
public class RetryableException extends RuntimeException {

    private static final long serialVersionUID = 519380986200368291L;

    private final String message;

    public RetryableException(final String message) {
        super(message);
        this.message = message;
    }

    public RetryableException(final String message, final Object... params) {
        final String formatMessage = String.format(message, params);
        this.message = formatMessage;

    }

    public RetryableException(final Throwable th) {
        super(th);
        this.message = th.getMessage();
    }

    public RetryableException(final String message, final Throwable th) {
        super(message, th);
        this.message = message;
    }

    @Override
    public String getMessage() {
        return this.message;
    }

}
